<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/10/3
  Time: 21:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<head>
    <base href="<%=basePath%>"/>
    <title>收货地址修改及添加页面</title>
</head>
<body>
<h1>收货地址修改及添加页面</h1>
<hr/>
<form method="post" name="submit_form" onsubmit="(function(a) {
        if (a === null)
        document.submit_form.action='shipping/add.do';
        else{
        document.submit_form.action='shipping/update.do';
        }
        document.submit_form.submit();
        })(${shipping.id})">
    <input type="hidden" name="id" value="${shipping.id}"/>
    <p>收货人姓名:<input type="text" name="receiverName" placeholder="请输入收货人姓名" value="${shipping.receiverName}"/></p>
    <p>收货人地区:<input type="text" name="receiverProvince" placeholder="省/直辖市/自治区" value="${shipping.receiverProvince}"/>&emsp;
        <input type="text" name="receiverCity" placeholder="地区市" value="${shipping.receiverCity}"/>&emsp;
        <input type="text" name="receiverDistrict" placeholder="市/县" value="${shipping.receiverDistrict}"/></p>
    <p>收货人地址:<input type="text" name="receiverAddress" placeholder="收货人详细地址" value="${shipping.receiverAddress}"/></p>
    <p>收货人邮编:<input type="text" name="receiverZip" placeholder="收货人邮编" value="${shipping.receiverZip}"/></p>
    <p>收货人手机:<input type="text" name="receiverMobile" placeholder="收货人手机号码" value="${shipping.receiverMobile}"/></p>
    <p>收货人电话:<input type="text" name="receiverPhone" placeholder="固定电话" value="${shipping.receiverPhone}"/></p>
    <input type="submit" value="添加/更新"/>
</form>
</body>
</html>
